{extend name="base" /}
{block name="body"}
<div class="layui-card">
    <div class="layui-card-header">{if condition="isset($data) "} 编辑原因{else}添加原因{/if}</div>
    <div class="layui-card-body">
        <form action="{:request()->url()}" class="layui-form" method="post">
            <div class="layui-form-item">
                <input type="hidden" name="id" value="{$data.id|default=''}">
                <input type="hidden" name="user" value="{$user}">
                <label class="layui-form-label">* 原因</label>
                <div class="layui-input-inline">
                    <input type="text" name="reason" value="{$data.reason|default=''}" autocomplete="off" placeholder="请输入原因" lay-verify="required" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">分数</label>
                <div class="layui-input-inline">
                    <input type="text" name="fraction" value="{$data.fraction|default=''}" autocomplete="off" placeholder="请输入分数" lay-verify="required" class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">* 状态</label>
                <div class="layui-input-inline">
                    <input type="radio" name="status" {if condition="isset($data) and $data.status eq 1"} checked="checked"{/if} value="1" >启用<input type="radio" name="status" {if condition="isset($data) and $data.status eq 0"} checked="checked"{/if} value="0" >禁用
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-filter="*" lay-submit="">保存</button>
                    <button class="layui-btn layui-btn-primary" type="reset">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>
{/block}
